<template>
  <div class="title-container" :style="borderShow?'':'border:none;'">
    <div class="left">
      <p class="title-con"><span>{{ title }}</span></p>
    </div>
    <div class="right">
      <slot name="btn" />
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: '标题'
    },
    borderShow: {
      type: Boolean,
      default: true
    }
  }
}
</script>

<style lang="scss" scoped>
@import "@/styles/variables.scss";
.title-container {
  height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid $border-color;
  margin-bottom: 20px;
  p{
    margin: 0px;
  }
  .left {
    .title-con {
      font-size: 16px;
      color: $main-color;
      padding-left: $block-space-x;
      border-left: 2px solid $main-color;
    }
  }
}
</style>
